/*
 * MainAboutBox.java
 */

package com.fsts.server;

import org.jdesktop.application.Action;

/**
 * 关于窗口
 * 
 * 
 * @version 1.0
 * @since JDK1.6(建议)
 */
public class MainAboutBox extends javax.swing.JDialog {
	private static final long serialVersionUID = 6429160562440401864L;

	public MainAboutBox(java.awt.Frame parent) {
		super(parent);
		initComponents();
		getRootPane().setDefaultButton(closeButton);
	}

	@Action
	public void closeAboutBox() {
		dispose();
	}

	private void initComponents() {

		closeButton = new javax.swing.JButton();
		javax.swing.JLabel appTitleLabel = new javax.swing.JLabel();
		javax.swing.JLabel versionLabel = new javax.swing.JLabel();
		javax.swing.JLabel appVersionLabel = new javax.swing.JLabel();
		javax.swing.JLabel vendorLabel = new javax.swing.JLabel();
		javax.swing.JLabel appVendorLabel = new javax.swing.JLabel();
		jLabel1 = new javax.swing.JLabel();
		jSeparator1 = new javax.swing.JSeparator();

		setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
		org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application
				.getInstance(com.fsts.server.Main.class).getContext()
				.getResourceMap(MainAboutBox.class);
		setTitle(resourceMap.getString("title")); // NOI18N
		setModal(true);
		setName("aboutBox"); // NOI18N
		setResizable(false);

		javax.swing.ActionMap actionMap = org.jdesktop.application.Application
				.getInstance(com.fsts.server.Main.class).getContext()
				.getActionMap(MainAboutBox.class, this);
		closeButton.setAction(actionMap.get("closeAboutBox")); // NOI18N
		closeButton.setText(resourceMap.getString("closeButton.text")); // NOI18N
		closeButton.setName("closeButton"); // NOI18N

		appTitleLabel.setFont(appTitleLabel.getFont().deriveFont(
				appTitleLabel.getFont().getStyle() | java.awt.Font.BOLD,
				appTitleLabel.getFont().getSize() + 4));
		appTitleLabel.setText(resourceMap.getString("Application.title")); // NOI18N
		appTitleLabel.setName("appTitleLabel"); // NOI18N

		versionLabel.setFont(versionLabel.getFont().deriveFont(
				versionLabel.getFont().getStyle() | java.awt.Font.BOLD));
		versionLabel.setText(resourceMap.getString("versionLabel.text")); // NOI18N
		versionLabel.setName("versionLabel"); // NOI18N

		appVersionLabel.setText(resourceMap.getString("Application.version")); // NOI18N
		appVersionLabel.setName("appVersionLabel"); // NOI18N

		vendorLabel.setFont(vendorLabel.getFont().deriveFont(
				vendorLabel.getFont().getStyle() | java.awt.Font.BOLD));
		vendorLabel.setText(resourceMap.getString("vendorLabel.text")); // NOI18N
		vendorLabel.setName("vendorLabel"); // NOI18N

		appVendorLabel.setText(resourceMap.getString("Application.vendor")); // NOI18N
		appVendorLabel.setName("appVendorLabel"); // NOI18N

		jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
		jLabel1.setName("jLabel1"); // NOI18N

		jSeparator1.setName("jSeparator1"); // NOI18N

		javax.swing.GroupLayout layout = new javax.swing.GroupLayout(
				getContentPane());
		getContentPane().setLayout(layout);
		layout.setHorizontalGroup(layout
				.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
				.addGroup(
						layout.createSequentialGroup()
								.addGap(62, 62, 62)
								.addGroup(
										layout.createParallelGroup(
												javax.swing.GroupLayout.Alignment.TRAILING)
												.addComponent(versionLabel)
												.addComponent(vendorLabel))
								.addGroup(
										layout.createParallelGroup(
												javax.swing.GroupLayout.Alignment.LEADING)
												.addGroup(
														layout.createSequentialGroup()
																.addGap(99, 99,
																		99)
																.addComponent(
																		appVendorLabel))
												.addGroup(
														layout.createSequentialGroup()
																.addGap(18, 18,
																		18)
																.addGroup(
																		layout.createParallelGroup(
																				javax.swing.GroupLayout.Alignment.LEADING)
																				.addComponent(
																						jLabel1)
																				.addComponent(
																						appVersionLabel))))
								.addContainerGap(171, Short.MAX_VALUE))
				.addComponent(jSeparator1,
						javax.swing.GroupLayout.Alignment.TRAILING,
						javax.swing.GroupLayout.DEFAULT_SIZE, 392,
						Short.MAX_VALUE)
				.addGroup(
						layout.createSequentialGroup().addGap(40, 40, 40)
								.addComponent(appTitleLabel)
								.addContainerGap(46, Short.MAX_VALUE))
				.addGroup(
						javax.swing.GroupLayout.Alignment.TRAILING,
						layout.createSequentialGroup()
								.addContainerGap(277, Short.MAX_VALUE)
								.addComponent(closeButton).addGap(52, 52, 52)));
		layout.setVerticalGroup(layout
				.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
				.addGroup(
						layout.createSequentialGroup()
								.addGap(35, 35, 35)
								.addComponent(appTitleLabel)
								.addPreferredGap(
										javax.swing.LayoutStyle.ComponentPlacement.RELATED)
								.addComponent(jSeparator1,
										javax.swing.GroupLayout.PREFERRED_SIZE,
										10,
										javax.swing.GroupLayout.PREFERRED_SIZE)
								.addPreferredGap(
										javax.swing.LayoutStyle.ComponentPlacement.RELATED)
								.addGroup(
										layout.createParallelGroup(
												javax.swing.GroupLayout.Alignment.LEADING)
												.addGroup(
														layout.createSequentialGroup()
																.addGap(11, 11,
																		11)
																.addComponent(
																		appVendorLabel)
																.addPreferredGap(
																		javax.swing.LayoutStyle.ComponentPlacement.RELATED,
																		39,
																		Short.MAX_VALUE))
												.addGroup(
														javax.swing.GroupLayout.Alignment.TRAILING,
														layout.createSequentialGroup()
																.addGap(13, 13,
																		13)
																.addGroup(
																		layout.createParallelGroup(
																				javax.swing.GroupLayout.Alignment.BASELINE)
																				.addComponent(
																						appVersionLabel)
																				.addComponent(
																						versionLabel))
																.addGap(18, 18,
																		18)))
								.addGroup(
										layout.createParallelGroup(
												javax.swing.GroupLayout.Alignment.LEADING)
												.addComponent(jLabel1)
												.addComponent(vendorLabel))
								.addGap(16, 16, 16).addComponent(closeButton)
								.addGap(18, 18, 18)));

		pack();
	}

	private javax.swing.JButton closeButton;
	private javax.swing.JLabel jLabel1;
	private javax.swing.JSeparator jSeparator1;
}
